<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
<title>Bootstrap 101 Template</title>

<!-- Bootstrap -->
<link href="bootstrap.min.css" rel="stylesheet">

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
      <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<style>
body {
	padding-top: 70px;
}

.panel-group {
	max-height: 770px;
	overflow: auto;
}

.leftMenu {
	margin: 10px;
	margin-top: 5px;
}

.leftMenu .panel-heading {
	font-size: 14px;
	padding-left: 20px;
	height: 36px;
	line-height: 36px;
	color: white;
	position: relative;
	cursor: pointer;
} /*转成手形图标*/
.leftMenu .panel-heading span {
	position: absolute;
	right: 10px;
	top: 12px;
}

.leftMenu .menu-item-left {
	padding: 2px;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 6px;
}

.leftMenu .menu-item-left:hover {
	background: #C4E3F3;
	border: 1px solid #1E90FF;
}

.merchant_merchantblock {
	float: left;
	width: 25%;
	background-color: #fff;
	height: 180px;
}

.merchant_merchantlogo {
	display: inline;
	padding: 20px;
	font-size: 12px;
	display: block;
}

.merchant_logo_icon {
	display: block;
	width: 70px;
	height: 70px;
	margin-bottom: block;
}

.merchant_merchantcontent {
	padding: 20px;
}

.merchant_merchanttitle {
	font-size: 16px;
	margin-bottom: 6px;
	font-weight: 600;
	color: #333;
	white-space: nowrap;
	text-overflow: ellipsis;
}
</style>

<script type="text/javascript">
	function selectType() {
		document.getElementById("selectTypeForm").submit();
	}
</script>
<body>
	<nav class="navbar navbar-default">
		<div class="container-fluid">
			<!-- Brand and toggle get grouped for better mobile display -->
			<div class="navbar-header">
				<button type="button" class="navbar-toggle collapsed"
					data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"
					aria-expanded="false">
					<span class="sr-only">Toggle navigation</span> <span
						class="icon-bar"></span> <span class="icon-bar"></span> <span
						class="icon-bar"></span>
				</button>
				<a class="navbar-brand" href="#">Merchant</a>
			</div>

			<!-- Collect the nav links, forms, and other content for toggling -->
			<div class="collapse navbar-collapse"
				id="bs-example-navbar-collapse-1">
				<ul class="nav navbar-nav">
					<li class="active"><a href="#">Link <span class="sr-only">(current)</span></a></li>
					<li><a href="#">Link</a></li>
					<li class="dropdown"><a href="#" class="dropdown-toggle"
						data-toggle="dropdown" role="button" aria-haspopup="true"
						aria-expanded="false">Dropdown <span class="caret"></span></a>
						<ul class="dropdown-menu">
							<li><a href="#">ASSESSED</a></li>
							<li><a href="#">ASSESSING</a></li>
							<li><a href="#">REJECT</a></li>
							<!--
            <li role="separator" class="divider"></li>
            <li><a href="#">Separated link</a></li>
            <li role="separator" class="divider"></li>
            <li><a href="#">One more separated link</a></li>
-->
						</ul></li>
				</ul>
				<div class="navbar-form navbar-left">
					<button type="submit" class="btn btn-default" data-toggle="modal"
						data-target="#addDish">ADD Dish</button>
					<div class="form-group">
						<input type="text" class="form-control" placeholder="Search">
					</div>

					<!--        <button type="submit" class="btn btn-default">Submit</button>-->
				</div>
				<!--    <button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">ADD Dish</button>-->
				<ul class="nav navbar-nav navbar-right">
<!-- 					<li><a href="#">商家头像</a></li> -->
					<li id="merchant"></li>
<!-- 					<li><a href="#" id="mId"></a></li> -->
					<li id="merchantName"></li>
					<li class="dropdown"><a href="#" class="dropdown-toggle"
						data-toggle="dropdown" role="button" aria-haspopup="true"
						aria-expanded="false"> <span class="caret"></span></a>
						<ul class="dropdown-menu">
							<li><a href="#" data-toggle="modal"
								data-target="#updateInfo">个人信息</a></li>
							<li><a href="#">退出登录</a></li>
							<!--            <li><a href="#">REJECT</a></li>-->
							<!--
            <li role="separator" class="divider"></li>
            <li><a href="#">Separated link</a></li>
            <li role="separator" class="divider"></li>
            <li><a href="#">One more separated link</a></li>
-->
						</ul></li>
				</ul>
				<div class="modal fade" id="addDish" tabindex="-1" role="dialog"
					aria-labelledby="myModalLabel">
					<div class="modal-dialog" role="document">
						<div class="modal-content">
							<div class="modal-header">
								<button type="button" class="close" data-dismiss="modal"
									aria-label="Close">
									<span aria-hidden="true">&times;</span>
								</button>
								<h4 class="modal-title" id="myModalLabel">Add Dishes</h4>
							</div>
							<form action="AddDishServlet" method="post" enctype="multipart/form-data" id="addForm">
							<div class="modal-body" style="height: 280px; overflow: auto;">
								
								<div class="form-group">
									<label class="col-sm-2 control-label" for="dish_name">Name:</label>
									<div class="col-sm-10">
										<input id="newDishName" class="form-control" type="text"
											placeholder="pizza" name="dName"/>
									</div>
									<div>
										<label></label>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label" for="dish_price">Price:</label>
									<div class="col-sm-10">
										<input id="newDishPrice" class="form-control" type="text"
											placeholder="price" name="dPrice"/>
									</div>
									<label></label>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label" for="image">Image
										of Dish:</label>
									<div class="col-sm-9">
										<img src="2%20(2).jpg" id="dishImageWillUpdate" alt="">tupian</img> <input
											id="newDishImg" type="file" name="image">
									</div>
									<label></label>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label" for="dishtype">Select
										a type:</label>
									<div class="col-sm-9">
										<select id="selDishType" name="pId">
										</select>
									</div>
								</div>
							</div>
							<div class="modal-footer">
								<button type="button" class="btn btn-default"
									data-dismiss="modal">Close</button>
<!-- 								<button id="addBtn" type="button" class="btn btn-primary">Add</button> -->
								<input type="submit" value="Add">
							</div>
							</form>
						</div>
					</div>
					<!-- /.modal-content -->
				</div>
				<!-- /.modal-dialog -->
			</div>

			<!-- update dish modal -->
			<div class="modal fade" id="updateDish" tabindex="-1" role="dialog"
				aria-labelledby="myModalLabel">
				<div class="modal-dialog" role="document">
					<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal"
								aria-label="Close">
								<span aria-hidden="true">&times;</span>
							</button>
							<h4 class="modal-title" id="myModalLabel">Update Dishes</h4>
						</div>
						<form action="UpdateDishServlet" method="post" enctype="multipart/form-data" id="updateForm">
						<div class="modal-body" style="height: 280px; overflow: auto;">
							<div class="form-group">
								<label class="col-sm-2 control-label" for="dish_name">Name:</label>
								<div class="col-sm-10">
									<input class="form-control" id="dish_name" type="text"
										placeholder="pizza" name="dName"/>
									<input id="dish_did" type="hidden"
										 name="dId"/>
								</div>
								<div>
									<label></label>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label" for="dish_price">Price:</label>
								<div class="col-sm-10">
									<input class="form-control" id="dish_price" type="text"
										placeholder="price" name="dPrice"/>
								</div>
								<label></label>
							</div>
							<div id="" class="form-group">
								<label class="col-sm-3 control-label" for="image">Image
									of Dish:</label>
								<div class="col-sm-9">
									<img src="2%20(2).jpg" alt="" id="image"></img> <input
										id="updateImg" type="file" id="exampleInputFile" name="image">
								</div>
								<label></label>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label" for="dishtype">Select
									a type:</label>
								<div class="col-sm-9">

									<select id="updateDishType" name="pId"> dishtype
									</select>

								</div>
							</div>
						</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-default"
								data-dismiss="modal">Close</button>
<!-- 							<button type="button" class="btn btn-primary">update</button> -->
						<input type="submit" value="Update">
						</div>
						</form>
					</div>
				</div>
				<!-- /.modal-content -->
			</div>
			<!-- /.modal-dialog -->
		</div>

		<!-- update merchant Modal  -->
		<div class="modal fade" id="updateInfo" tabindex="-1" role="dialog"
			aria-labelledby="myModalLabel">
			<div class="modal-dialog" role="document">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-label="Close">
							<span aria-hidden="true">&times;</span>
						</button>
						<h4 class="modal-title" id="myModalLabel">Merchant
							Information</h4>
					</div>

					<div class="modal-body" style="height: 300px; overflow: auto;">
						<div class="form-group">
							<label class="col-sm-2 control-label" for="mer_name">username</label>
							<div class="col-sm-10">
								<input class="form-control" id="mer_name" type="text"
									placeholder="username" />
							</div>
							<label></label>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label" for="mer_pass">password</label>
							<div class="col-sm-10">
								<input class="form-control" id="mer_pass" type="password"
									placeholder="password" />
							</div>
							<label></label>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label" for="mer_address">address</label>
							<div class="col-sm-10">
								<input class="form-control" id="mer_address" type="text"
									placeholder="address" />
							</div>
							<label></label>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label" for="mer_ico">ico</label>
							<div class="col-sm-10">
								<img src="2%20(2).jpg" alt="" id="mer_ico">tupian</img> <input
									type="file" id="input_ico">
							</div>
						</div>
					</div>

					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
						<button type="button" id="user_btn" class="btn btn-primary">update</button>
					</div>
				</div>
				<!-- /.modal-content -->
			</div>
			<!-- /.modal-dialog -->
		</div>
		<!-- /.modal -->
		</div>
		<!-- /.navbar-collapse -->
		</div>
		<!-- /.container-fluid -->
	</nav>
	<hr>

	<!-- 显示商家列表的界面 -->
	<h1>Dish Type</h1>
	<div class="row">
		<div class="col-md-2">
			<div class="panel-group table-responsive" role="tablist">
				<div class="panel panel-primary leftMenu">
					<!-- 利用data-target指定要折叠的分组列表 -->
					<div class="panel-heading" style="background-color: #FFB300;"
						id="collapseListGroupHeading1" data-toggle="collapse"
						data-target="#collapseListGroup1" role="tab">
						<h4 class="panel-title">
							dish type <span class="glyphicon glyphicon-chevron-up right"></span>
						</h4>
					</div>
					<!-- .panel-collapse和.collapse标明折叠元素 .in表示要显示出来 -->
					<div id="collapseListGroup1" class="panel-collapse collapse in"
						role="tabpanel" aria-labelledby="collapseListGroupHeading1">
						<ul id="dishTypes" class="list-group">
<!-- 							<li  id="dishTypeLi" class="list-group-item"> -->
<!-- 								利用data-target指定URL -->
<!-- 								<button class="menu-item-left" data-target="test2.html"> -->
<!-- 									<span class="glyphicon glyphicon-triangle-right"></span>ALL -->
<!-- 								</button> -->
<!-- 							</li> -->
<!-- 							<li class="list-group-item"> -->

<!-- 								<button class="menu-item-left" data-target="test2.html"> -->
<!-- 									<span class="glyphicon glyphicon-triangle-right"></span>川菜 -->
<!-- 								</button> -->
<!-- 							</li> -->
<!-- 							<li class="list-group-item"> -->
<!-- 								<button class="menu-item-left"> -->
<!-- 									<span class="glyphicon glyphicon-triangle-right"></span>粤菜 -->
<!-- 								</button> -->
<!-- 							</li> -->
<!-- 							<li class="list-group-item"> -->
<!-- 								<button class="menu-item-left"> -->
<!-- 									<span class="glyphicon glyphicon-triangle-right"></span>湘菜 -->
<!-- 								</button> -->
<!-- 							</li> -->
<!-- 							<li class="list-group-item"> -->
<!-- 								<button class="menu-item-left"> -->
<!-- 									<span class="glyphicon glyphicon-triangle-right"></span>甜食 -->
<!-- 								</button> -->
<!-- 							</li> -->

						</ul>
					</div>
				</div>
				<!--panel end-->
				<div class="panel panel-primary leftMenu">
					<div class="panel-heading" style="background-color: #FFB300;"
						id="collapseListGroupHeading2" data-toggle="collapse"
						data-target="#collapseListGroup2" role="tab">
						<h4 class="panel-title">
							分组2 <span class="glyphicon glyphicon-chevron-down right"></span>
						</h4>
					</div>
					<div id="collapseListGroup2" class="panel-collapse collapse"
						role="tabpanel" aria-labelledby="collapseListGroupHeading2">
						<ul class="list-group">
							<li class="list-group-item">
								<button class="menu-item-left">
									<span class="glyphicon glyphicon-triangle-right"></span>分组项2-1
								</button>
							</li>
							<li class="list-group-item">
								<button class="menu-item-left">
									<span class="glyphicon glyphicon-triangle-right"></span>分组项2-2
								</button>
							</li>
							<li class="list-group-item">
								<button class="menu-item-left">
									<span class="glyphicon glyphicon-triangle-right"></span>分组项2-3
								</button>
							</li>
							<li class="list-group-item">
								<button class="menu-item-left">
									<span class="glyphicon glyphicon-triangle-right"></span>分组项2-4
								</button>
							</li>
						</ul>
					</div>
				</div>
			</div>
		</div>
		<div id="dishPanel" class="panel panel-default"
			style="height: 1260px; width: 1000px; overflow: auto;">
<!-- 			<div class='col-md-3'> -->
<!-- 				<div class='thumbnail' style="margin-top: 20px;"> -->
<!-- 					<img src="2%20(2).jpg" -->
<!-- 						style="float: left; width: 70px; height: 70px;"> -->
<!-- 					<div class='caption'> -->
<!-- 						<p>price</p> -->
<!-- 						<a href=''>delete</a> <a href='' data-toggle="modal" -->
<!-- 							data-target="#updateDish">update</a> -->
<!-- 					</div> -->
<!-- 				</div> -->
<!-- 			</div> -->
<!-- 			<div class='col-md-3'> -->
<!-- 				<div class='thumbnail' style="margin-top: 20px;"> -->
<!-- 					<img src="2%20(2).jpg" -->
<!-- 						style="float: left; width: 70px; height: 70px;"> -->
<!-- 					<div class='caption'> -->
<!-- 						<p>price</p> -->
<!-- 						<a href=''>delete</a> <a href='' data-toggle="modal" -->
<!-- 							data-target="#updateDish">update</a> -->
<!-- 					</div> -->
<!-- 				</div> -->
<!-- 			</div> -->
<!-- 			<div class='col-md-3'> -->
<!-- 				<div class='thumbnail' style="margin-top: 20px;"> -->
<!-- 					<img src="2%20(2).jpg" -->
<!-- 						style="float: left; width: 70px; height: 70px;"> -->
<!-- 					<div class='caption'> -->
<!-- 						<p>price</p> -->
<!-- 						<a href=''>delete</a> <a href='' data-toggle="modal" -->
<!-- 							data-target="#updateDish">update</a> -->
<!-- 					</div> -->
<!-- 				</div> -->
<!-- 			</div> -->
<!-- 			<div class='col-md-3'> -->
<!-- 				<div class='thumbnail' style="margin-top: 20px;"> -->
<!-- 					<img src="2%20(2).jpg" -->
<!-- 						style="float: left; width: 70px; height: 70px;"> -->
<!-- 					<div class='caption'> -->
<!-- 						<p>price</p> -->
<!-- 						<a href=''>delete</a> <a href='' data-toggle="modal" -->
<!-- 							data-target="#updateDish">update</a> -->
<!-- 					</div> -->
<!-- 				</div> -->
<!-- 			</div> -->
<!-- 			<div class='col-md-3'> -->
<!-- 				<div class='thumbnail' style="margin-top: 20px;"> -->
<!-- 					<img id="dishImage" src="2%20(2).jpg" -->
<!-- 						style="float: left; width: 70px; height: 70px;"> -->
<!-- 					<div class='caption'> -->
<!-- 						<p>price</p> -->
<!-- 						<a href=''>delete</a> <a href='' data-toggle="modal" -->
<!-- 							data-target="#updateDish">update</a> -->
<!-- 					</div> -->
<!-- 				</div> -->
<!-- 			</div> -->
		</div>

		<!--
		<div class="panel panel-default"
			style="height: 1260px; width: 1000px; overflow: auto;">
			<a id="adish" class="merchant_merchantblock" data-toggle="modal"
						data-target="#updateDish">
				<div class="merchant_merchantlogo">
					<img id="dishImage" src="2%20(2).jpg" class="merchant_logo_icon" width="70"
						height="70" alt="传世饺子"> <span id="dishPrice">Price</span>
				</div>
                
				<div class="merchant_merchantcontent">
					
                    <div class="merchant_merchanttitle">麻辣香锅</div>
                    
				</div>
			</a> <a class="merchant_merchantblock">
				<div class="merchant_merchantlogo">
					<img id="dishImg" src="2%20(2).jpg" class="merchant_logo_icon" width="70"
						height="70" alt="传世饺子"> <span>25分钟</span>
				</div>
				<div class="merchant_merchantcontent">
					<div class="merchant_merchanttitle">水煮肉片</div>

				</div>
            
			</a> <a class="merchant_merchantblock">
				<div class="merchant_merchantlogo">
					<img src="2%20(2).jpg" class="merchant_logo_icon" width="70"
						height="70" alt="传世饺子"> <span>25分钟</span>
				</div>
				<div class="merchant_merchantcontent">
					<div class="merchant_merchanttitle">黄焖鸡米饭</div>

				</div>
			</a> <a class="merchant_merchantblock">
				<div class="merchant_merchantlogo">
					<img src="2%20(2).jpg" class="merchant_logo_icon" width="70"
						height="70" alt="传世饺子"> <span>25分钟</span>
				</div>
				<div class="merchant_merchantcontent">
					<div class="merchant_merchanttitle">黄焖鸡米饭</div>

				</div>
			</a> <a class="merchant_merchantblock">
				<div class="merchant_merchantlogo">
					<img src="2%20(2).jpg" class="merchant_logo_icon" width="70"
						height="70" alt="传世饺子"> <span>25分钟</span>
				</div>
				<div class="merchant_merchantcontent">
					<div class="merchant_merchanttitle">黄焖鸡米饭</div>

				</div>
			</a> <a class="merchant_merchantblock">
				<div class="merchant_merchantlogo">
					<img src="2%20(2).jpg" class="merchant_logo_icon" width="70"
						height="70" alt="传世饺子"> <span>25分钟</span>
				</div>
				<div class="merchant_merchantcontent">
					<div class="merchant_merchanttitle">黄焖鸡米饭</div>

				</div>
			</a> <a class="merchant_merchantblock">
				<div class="merchant_merchantlogo">
					<img src="2%20(2).jpg" class="merchant_logo_icon" width="70"
						height="70" alt="传世饺子"> <span>25分钟</span>
				</div>
				<div class="merchant_merchantcontent">
					<div class="merchant_merchanttitle">黄焖鸡米饭</div>

				</div>
			</a> <a class="merchant_merchantblock">
				<div class="merchant_merchantlogo">
					<img src="2%20(2).jpg" class="merchant_logo_icon" width="70"
						height="70" alt="传世饺子"> <span>25分钟</span>
				</div>
				<div class="merchant_merchantcontent">
					<div class="merchant_merchanttitle">黄焖鸡米饭</div>

				</div>
			</a>
		</div>
-->

		<!--分页 -->
		<!--
		<nav aria-label="Page navigation" style="text-align: center;">
			<ul class="pagination">
				<li><a href="#" aria-label="Previous"> <span
						aria-hidden="true">&laquo;</span>
				</a></li>
				<li><a href="#">1</a></li>
				<li><a href="#">2</a></li>
				<li><a href="#">3</a></li>
				<li><a href="#">4</a></li>
				<li><a href="#">5</a></li>
				<li><a href="#" aria-label="Next"> <span aria-hidden="true">&raquo;</span>
				</a></li>
			</ul>
		</nav>
-->
		<!--	</div>-->








		<!--
      <div class="list-group">
  <a href="#" class="list-group-item active">
    Cras justo odio
  </a>
  <a href="#" class="list-group-item">川菜</a>
  <a href="#" class="list-group-item">粤菜</a>
  <a href="#" class="list-group-item">湘菜</a>
  <a href="#" class="list-group-item">甜品</a>
</div>
-->




		<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
		<script src="jquery.min.js"></script>
		<!-- Include all compiled plugins (below), or include individual files as needed -->
		<script src="bootstrap.min.js"></script>
		<script src="mainpage.js"></script>
		<script>
			$(function() {
				$(".panel-heading").click(function(e) {
					/*切换折叠指示图标*/
					$(this).find("span").toggleClass("glyphicon-chevron-down");
					$(this).find("span").toggleClass("glyphicon-chevron-up");
				});
			});
		</script>
</body>
</html>

